/**
  ******************************************************************************
  * File Name          : cf.h
  * Description        : 
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */

#ifndef __CF_H
#define __CF_H
/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
#include "route_cf_interface.h"

#define CF_RXCMDQUE_LENGTH      10
#define CF_RXCMDQUE_ITEMSIZE    sizeof(uint16_t)

#define CF_CMD_ON               (0xA0A1u)
#define CF_CMD_OFF              (0xA2A3u)

typedef struct
{
  Cf_ParaType para;
  uint16_t crc16;
}Cf_StorageParaType;

extern const uint16_t Cf_SendCmdOn;
extern const uint16_t Cf_SendCmdOff;

extern Cf_ParaType Cf_RunPara;
extern Cf_StateType Cf_State_last;
extern volatile Cf_StateType Cf_State;
extern volatile uint32_t Cf_TimerTick;

extern void Cf_BspInit(void);
extern void Cf_TimeoutIsr(void);
extern uint8_t Cf_ParaCheck(Cf_ParaType *para);

#endif /* __CF_H */
